package com.xianyun.book.event.handler;

import com.alibaba.cola.catchlog.CatchAndLog;
import com.alibaba.cola.dto.Response;
import com.xianyun.book.common.core.event.EventHandler;
import com.xianyun.book.common.core.event.EventHandlerI;
import com.xianyun.book.domain.gateway.SystemUserGateway;
import com.xianyun.book.dto.domainevent.UserLoginSuccessEvent;
import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;

/**
 * @author ytt
 */
@CatchAndLog
@Slf4j
@EventHandler
public class UserLoginSuccessHandler implements
        EventHandlerI<Response, UserLoginSuccessEvent> {
    @Resource
    private SystemUserGateway userGateway;

    @Override
    public Response execute(UserLoginSuccessEvent event) {
        log.info("登录成功 -----用户:{}",event.getUserName());
        return Response.buildSuccess();
    }
}
